package com.kaizeli.website.service.impl;

import com.kaizeli.website.service.DynamicImportService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

/**
 * 合同人员动态导入服务
 */
@Slf4j
@Service
public class ContractPersonnelDynamicImportServiceImpl {
    
    @Autowired
    private DynamicImportServiceImpl dynamicImportService;
    
    public Map<String, Object> importContractPersonnel(MultipartFile file) {
        dynamicImportService.setTableType("contract_personnel");
        return dynamicImportService.dynamicImport(file);
    }
    
    public Map<String, Object> importContractPersonnelWithUpdate(MultipartFile file) {
        dynamicImportService.setTableType("contract_personnel");
        return dynamicImportService.dynamicImportWithUpdate(file);
    }
    
    public Map<String, Object> getImportHelp() {
        dynamicImportService.setTableType("contract_personnel");
        return dynamicImportService.getImportHelp();
    }
}

